/**
 * 
 */
package org.gigi.security.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

/**
 * 用户
 * 
 * @author Eugene Wang 2011-3-28
 * @see
 */
@Entity
@Table(name = "sec_user")
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String username;
	private String password;
	@Type(type="true_false")
	private boolean accountNonExpired = true;
	@Type(type="true_false")
	private boolean accountNonLocked = true;
	@Type(type="true_false")
	private boolean credentialsNonExpired = true;
	@Type(type="true_false")
	private boolean enabled = true;
	private String email;

	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public boolean isAccountNonExpired() {
		return accountNonExpired;
	}
	public void setAccountNonExpired(boolean accountNonExpired) {
		this.accountNonExpired = accountNonExpired;
	}
	public boolean isAccountNonLocked() {
		return accountNonLocked;
	}
	public void setAccountNonLocked(boolean accountNonLocked) {
		this.accountNonLocked = accountNonLocked;
	}
	public boolean isCredentialsNonExpired() {
		return credentialsNonExpired;
	}
	public void setCredentialsNonExpired(boolean credentialsNonExpired) {
		this.credentialsNonExpired = credentialsNonExpired;
	}
	public boolean isEnabled() {
		return enabled;
	}
	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
}
